# -*- coding: utf-8 -*-
# @Time    : 2022/11/13 19:09
# @Author  : gu'leng
# @File    : 初始化用户数据目录cookies登录2.0.py
# @Software: PyCharm
# import requests
# res = requests.get(f"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Flmg.jj20.com%2Fup%2Fallimg%2F1114%2F121420113514%2F201214113514-6-1200.jpg&refer=http%3A%2F%2Flmg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1670929963&t=908f8ac2d707450f71b4bf8ffeaf5fb6")
# with open("wewe.jpg","wb") as f:
#     f.write(res.content)


import time

from selenium import webdriver
driver = webdriver.Chrome(executable_path=r"F:\work\driver\chrome\126\chromedriver.exe")
driver.get("http://cymtest.piccmall.cn:10087/bht_web/html/admin.html#/system")
# driver.get("https://www.baidu.com/")

c1 = {'name': 'token',
      'value': 'eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJpYXQiOjE3Mjg0NjUxMzUsInN1YiI6Ik1BTkFHRV9TSU1QTEUiLCJpc3MiOiJlbGVhcm4iLCJ1c2VyTmFtZSI6IndhbmdkaSIsInVzZXJJZCI6IjE0NTYxNDA2NzU0NTIzMDU0MDkifQ.LuGnrsWwFXJ9bd4hAo72_LVm9VAJTQR6o0Be1hAXiLI'}

driver.add_cookie(c1)
driver.get("http://cymtest.piccmall.cn:10087/bht_web/html/admin.html#/system")
time.sleep(10)
driver.close()
